import BaseLayout from "@/views/BaseLayout.vue"

export default [
  {
    path: "",
    redirect: "/home",
    component: BaseLayout,
    children: [
      {
        path: "/",
        redirect: "/home",
        component: () => import("../views/HomePage.vue"),
        children: [
          {
            path: "home",
            name: "home",
            component: () => import("../views/mains/HomePageMain.vue"),
          },
          {
            path: "blogs",
            name: "blogs",
            component: () => import("../views/mains/BlogsAllMain.vue"),
          },
          {
            path: "archive",
            name: "archive",
            component: () => import("../views/mains/ArchiveMain.vue"),
          },
          {
            path: "archive/:label",
            name: "tagToBlogs",
            component: () => import("../views/mains/TagsDetail.vue"),
            props: true,
          },
          {
            path: "/books",
            name: "books",
            component: () => import("../views/Books.vue"),
          },
          {
            path: "/dramas",
            name: "dramas",
            component: () => import("../views/Dramas.vue"),
          },
        ],
      },
      {
        path: "/blogs/reader/:id",
        name: "blogReader",
        component: () => import("../views/BlogReader.vue"),
        props: true,
      },
      {
        path: "/blogs/editor/:id",
        name: "blogEditor",
        component: () => import("../views/BlogEditor.vue"),
        props: true,
      },
      {
        path: "/blogs/add",
        name: "blogAddor",
        component: () => import("../views/BlogAddor.vue"),
      },
    ],
  },
  {
    path: "/404",
    name: "404",
    component: () => import("../views/NotFound.vue"),
  },
]
